package com.hundsun.documentripper.config;


import com.hundsun.documentripper.filter.LoginHandlerInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Note：
 *
 * @author ：mengjw
 * @description：MVC配置
 * @date ：Created in 2021/3/18
 */
@Configuration
public class MyWebMvcConfigurer implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginHandlerInterceptor())
                .addPathPatterns("/**")
                .excludePathPatterns("/user/login", "/*.html", "/*.js")
                .excludePathPatterns("/assets/**");
    }

}
